home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
WD_SRC.ZIP
/
SYSTEM
/
DYNARRAY.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-12-29
|
2KB
|
120 lines
// dynarray.hpp Header file for Mike's dynamic array classes. These are only created to ease portability to the Mac.
// Normally I would use Microsoft's classes.
#ifndef DYNARRAY_HEADER
#define DYNARRAY_HEADER
class MDWordArray
{
public:
MDWordArray();
~MDWordArray();
MDWordArray &operator=( MDWordArray ©From );
DWORD Get( UWORD index );
BOOL Set( UWORD index, DWORD newVal );
UWORD NumElements();
BOOL Insert( UWORD index, DWORD toInsert );
BOOL Delete( UWORD index );
BOOL Append( DWORD toAdd );
BOOL SetSize( UWORD newSize );
DWORD *GetBuffer() {return pDWordArray;}
DWORD *pDWordArray;
UWORD nElements;
BOOL CheckIndex( UWORD index );
};
class MWordArray
{
public:
MWordArray();
~MWordArray();
MWordArray &operator=( MWordArray ©From );
WORD Get( UWORD index );
BOOL Set( UWORD index, WORD newVal );
UWORD NumElements();
BOOL Insert( UWORD index, WORD toInsert );
BOOL Delete( UWORD index );
BOOL Append( WORD toAdd );
BOOL SetSize( UWORD newSize );
WORD *pWordArray;
UWORD nElements;
BOOL CheckIndex( UWORD index );
};
class MByteArray
{
public:
MByteArray();
~MByteArray();
MByteArray &operator=( MByteArray ©From );
BYTE Get( UWORD index );
BOOL Set( UWORD index, BYTE newVal );
UWORD NumElements();
BOOL Insert( UWORD index, BYTE toInsert );
BOOL Delete( UWORD index );
BOOL Append( BYTE toAdd );
BOOL SetSize( UWORD newSize );
BYTE *pByteArray;
UWORD nElements;
BOOL CheckIndex( UWORD index );
};
class MPointerArray
{
public:
MPointerArray();
~MPointerArray();
MPointerArray &operator=( MPointerArray ©From );
void *Get( UWORD index );
BOOL Set( UWORD index, void *newVal );
UWORD NumElements();
BOOL Insert( UWORD index, void *toInsert );
BOOL Delete( UWORD index );
BOOL Append( void *toAdd );
BOOL SetSize( UWORD newSize );
Index GetIndexFromPointer( void *pMatch );
void **pPointerArray;
UWORD nElements;
BOOL CheckIndex( UWORD index );
};
Index ScanForPointer( void *scanFor, void *scanIn, DWORD nPointers );
#endif